package com.classes;

import com.reflect.Person;
import org.junit.Test;

public class NewInstanceTest {
    @Test
    public void test1() throws InstantiationException, IllegalAccessException {
//        1、获取class
        Class<Person> clazz = Person.class;
//        2、创建实例对象
        Person person = clazz.newInstance();
        System.out.println(person);

    }
}
